#pragma once

#include <d3dx9.h>
#include <vector>


#include "CGame.h"
#include "QuadTree.h"
#include "LoadMap.h"
#include "Mario.h"
#include "Camera.h"
#include "Object.h"

using namespace std;
//typedef struct Teleport
//{
//	int sourceX;
//	int sourceY;
//	int desX;
//	int desY;
//	int newRoom;
//	int screenX;
//	int screenY;
//};

class CGameMario :
	public CGame
{
protected:
	 

public:

	

	CGameMario(HINSTANCE hInstance, LPCSTR GameName, LPSTR lpCmdLine, int nShowCmd, int FPS, int ScreenWidth, int ScreenHeight);
	~CGameMario(void);

	


	void GameUpdate();
	void RenderFrame();

	void LoadResource();
	inline void ProcessMenu(int Action);


protected:
 
	LPD3DXSPRITE _spriteHandler;	// SpriteHandler to draw texture

	Camera *camera;
	Mario *_mario;
	list<Object*> obj_list;

	LoadMap *load_QTree;
	QuadTree *quadtree;


	void ProcessKeyboard();
	
	void update(float time);

};

